package com.lnsoft.cac.server.handle.webservice;

import javax.jws.WebService;

import com.lnsoft.cac.server.handle.threadpools.ServiceInvokePools;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@WebService(serviceName="DownloadCtrlService",//对外发布的服务名
        targetNamespace="http://server.cag.nari.com/",//指定你想要的名称空间，通常使用使用包名反转
        endpointInterface= "com.lnsoft.cac.server.handle.webservice.DownloadCtrlService")//服务接口全路径, 指定做SEI（Service EndPoint Interface）服务端点接口
@Component
public class DownloadCtrlServiceImpl implements DownloadCtrlService {
    @Autowired
    private ServiceInvokePools invokePools;

    @Override
    public String downloadCAGCtrl(String strXMLParams) {
        log.info("*********DownloadCtrlService*******");
        log.info(strXMLParams);

        I2CAGSyncRspMsg rspMsg = new I2CAGSyncRspMsg();
        invokePools.downloadCAGCtrlHandle(strXMLParams);
        rspMsg.setResultCode("0");
        log.info("downloadCAGCtrlResp: {}",rspMsg.getMsg());

        return rspMsg.getMsg();
    }
}
